<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

<TITLE>Switch -X&lt;file&gt; - exclude specified file</TITLE>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">

	<PARAM NAME="Keyword" VALUE="Switches: -X<file> - exclude specified
file">
</OBJECT>

<P class="title"><A NAME="HELPSwX"></A>Switch <B>-X&lt;file&gt; </B>
-  exclude specified file<hr></P>

<P>Exclude the specified file or folder from operation. 
Wildcards can be used in both the name and path parts of file mask.
You can specify the switch <B>-x</B> several times to define several
exclusion masks in the same command line.</P>

<P>If mask contains wildcards, it applies to files in current folder
and its subfolders. It is not recursive without wildcards,
so "filename" mask will exclude 'filename' file only in current folder
when archiving or in root archive folder when extracting.</P>

<P>Use "*\filename" syntax to exclude "filename" recursively
in all folders.</P>

<P>If you know the exact path to file, you can use "path\filename"
syntax to exclude only this copy of "filename". If you use
-xpath\filename syntax when unpacking an archive, "path" must be
the path inside of archive, not the file path on the disk after
unpacking.</P>

<P>By default, masks containing wildcards are applied only to files.
If you need a mask with wildcards to exclude several folders,
use the special syntax for folder exclusion masks.
Such masks must have the trailing <B>\</B> character. For example,
"*tmp*\" mask will exclude all folders matching "*tmp*" and "*\tmp\"
will exclude all 'tmp' folders. Since wildcards are present,
both masks will be applied to contents of current folder
and all its subfolders. Folder exclusion masks are supported
for <A HREF="HELPRARVersusZIP.htm">RAR</A> and <A HREF=
"HELPRARVersusZIP.htm">ZIP</A> formats only.</P>

<P>If you wish to exclude only one folder, specify the exact
name of folder including the absolute or relative path
without any wildcards. In this case you do not need to append
the path separator to mask, which is required only for folder
exclusion masks containing wildcards to distinguish them
from file exclusion masks.</P>


<h1><B>Examples</B></h1>

<ol>
  <li>compress all files except *.jpg and *.avi in current folder
      and its subfolders</li>
</ol>
<blockquote>
  <p class="sample">WinRAR a -r -x*.jpg -x*.avi rawfiles</p>
</blockquote>
<ol start="2">
  <li>compress all files on the disk c: except temp folders and files
    inside of temp folders</li>
</ol>
<blockquote>
  <p class="sample">WinRAR a -r -x*\temp\ savec c:\*</p>
</blockquote>
<ol start="3">
  <li>extract all files except *.txt from docs.rar</li>
</ol>
<blockquote>
  <p class="sample">WinRAR x -x*.txt docs</p>
</blockquote>
</BODY>
</HTML>
